package com.yangyang.rpc.core.registry;

import com.yangyang.rpc.core.registry.zookeeper.ZkServiceRegistry;

import java.util.Set;

/**
 * 服务注册
 * @author chenshunyang
 *
 */
public class ServiceRegistry{

	//address实例   zookeeper://127.0.0.1:2181
	public static void register(int port, String registerAddress, Set<String> serviceSet){
		String[] addr= registerAddress.split("://");
		String protocol = addr[0];
		String addList= addr[1];
		if (protocol.equals("zookeeper")){
			ZkServiceRegistry.register(port,addList,serviceSet);
		}else if (protocol.equals("redis")){

		}
	}

}

